//
//  WCNSetTimeCCell.m
//  WCN
//
//  Created by 杨鑫 on 15/6/9.
//  Copyright (c) 2015年 ShanghaiCize Trade And Business Co., Ltd. All rights reserved.
//

#import "WCNSetTimeCCell.h"
//
#import "Macros.h"

@implementation WCNSetTimeCCell
{
    WCNEfffectServiceTimeType _timeType;
    

}
- (void)awakeFromNib {
    // Initialization code
    self.timeLabel.layer.cornerRadius = 16;
    self.timeLabel.layer.borderWidth = kOnePX;
    self.timeLabel.layer.borderColor = [UIColor clearColor].CGColor;
}

- (void)setSelected:(BOOL)selected
{
    [super setSelected:selected];
    
    if (selected) {
        if (_timeType ==WCNEfffectServiceTimeTypeHospitalOut) {
            self.timeLabel.layer.borderColor = HexRGB(0xea1311).CGColor;
        }else{
            self.timeLabel.layer.borderColor = [UIColor blueColor].CGColor;
        }
        
    } else {
        self.timeLabel.layer.borderColor = [UIColor clearColor].CGColor;
    }
}
-(void)configWithModel:(timePeroidModel *)model
{
    
    self.timeLabel.text =model.timePeriod;
    if (model.isSelectdItem) {
        self.selected =YES;
    }
    
}
- (void)configWithNewModel:(WCNTimePeriodModel *)model
{
    _timeType =model.timeType;
    if (model.isSelectItem) {
        self.selected = YES;
    }
    self.timeLabel.text = model.timePeriod;

}
- (void)configWithAddModel:(WCNTemperiodIdForAdd *)model
{
    _timeType =model.timeType;
    if (model.isSelectItem) {
        self.selected =YES;
        
    }
    self.timeLabel.text = model.timePeriod;


}
@end
